home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
dev
/
amos
/
ProcLib20.lha
/
Screens
/
RDZONE.Amos
/
RDZONE.amosSourceCode
Wrap
AMOS Source Code
|
1993-10-29
|
1KB
|
33 lines
'*********************************************************
'
'RDZONE[SCRN,Z]
'
'RDZONE sets the shared variables X1,Y1,X2,Y2 to the corner co-ordinates
'of zone Z on screen SCRN, without changing that screen to the current
'screen on exiting.
'
'The procedure returns the parameter True, if the zone existed, false
'if it didn't
'
'NOTE: No error is produced if the zone Z does not exist - the variables
'X1,Y1,X2 & Y2 are not changed in this case.
'
'RdZone is useful for: Using zones for purposes other than mouse/collision
' detection
'
' Getting the zone co-ordinates to pass to screen copy
' it invert a zone (use minterm %110000)
'
Procedure RDZONE[SCRN,Z]
Shared X1,Y1,X2,Y2
A0=Screen : Screen SCRN
If Z>=Deek(Screen Base+214)
A2=False
Else
A1=Leek(Screen Base+210)+(Z-1)*8
X1=Min(Deek(A1),Deek(A1+4)) : Y1=Min(Deek(A1+2),Deek(A1+6))
X2=Max(Deek(A1),Deek(A1+4)) : Y2=Max(Deek(A1+2),Deek(A1+6))
A2=True
End If
Screen A0
End Proc[A2]